const searchBtn = document.getElementById('search-btn')
const cover = document.getElementById('cover')
const search = document.getElementById('search')
const searchInput = document.getElementById('search-input')
searchBtn.onclick = () => {
  cover.classList.toggle('active')
  searchInput.focus()
}
search.onclick = (event) => {
  event.stopPropagation()
}

cover.onclick = function () {
  // 阻止事件的冒泡
  cover.classList.toggle('active')
}
